﻿using UnityEngine;
using System.Collections;

public class FX_TextureSeq : MonoBehaviour 
{
	public Texture2D[] frames; 
	public float framesPerSecond = 20.0f; 


	// Use this for initialization
	void Start () 
	{
	
	}
	
	// Update is called once per frame
	void Update ()
	{
		int index = (int)(Time.time * framesPerSecond); 
		index = index % frames.Length; 
		renderer.material.mainTexture = frames[index]; 
	}
}
